/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Enum.java to edit this template
 */
package org.flower.httprc.http;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author ZhuYanXin
 */
public enum Charset {
    UTF_8("UTF-8"),
    US_ASCII("US-ASCII"),
    ISO_8859_1("ISO-8859-1"),
    UTF_16("UTF-16"),
    UTF_16LE("UTF-16LE"),
    UTF_16BE("UTF-16BE");

    private final String value;

    Charset(String value) {
        this.value = value;
    }

    public String value() {
        return value;
    }

    public static String[] getValues() {
        Charset[] values = Charset.values();
        List<String> list = new ArrayList<>();
        for (Charset type : values) {
            list.add(type.value());
        }
        return list.toArray(String[]::new);
    }
}
